package com.changgou.pay.feign;

import com.changgou.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(name = "pay")
public interface PayFeign {

    // 下单
    @GetMapping("/wxpay/nativePay")
    public Result nativePay(@RequestParam("orderId") String orderid, @RequestParam("money") Integer money);


    // 下单30分钟后，查询微信订单，是否已支付
    @GetMapping("/wxpay/queryorder/{orderId}")
    public Result confirmWxPay(String orderId);


    // 基于微信关闭订单
    @PutMapping("/wxpay/close/{orderId}")
    public Result closeOrder(@PathVariable("orderId") String orderId);
}
